<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Rails::Railtie::Configuration</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" />
<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Class</span> 
            Rails::Railtie::Configuration 
            
                <span class="parent">&lt; 
                    
                    <a href="../../Object.html">Object</a>
                    
                </span>
            
        </h1>
        <ul class="files">
            
            <li><a href="../../../files/railties/lib/rails/railtie/configuration_rb.html">railties/lib/rails/railtie/configuration.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>A</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Configuration.html#method-i-after_initialize">after_initialize</a>,
              </li>
            
              
              <li>
                <a href="Configuration.html#method-i-app_generators">app_generators</a>,
              </li>
            
              
              <li>
                <a href="Configuration.html#method-i-app_middleware">app_middleware</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>B</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Configuration.html#method-i-before_configuration">before_configuration</a>,
              </li>
            
              
              <li>
                <a href="Configuration.html#method-i-before_eager_load">before_eager_load</a>,
              </li>
            
              
              <li>
                <a href="Configuration.html#method-i-before_initialize">before_initialize</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>E</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Configuration.html#method-i-eager_load_namespaces">eager_load_namespaces</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>N</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Configuration.html#method-c-new">new</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>R</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Configuration.html#method-i-respond_to-3F">respond_to?</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>T</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Configuration.html#method-i-to_prepare">to_prepare</a>,
              </li>
            
              
              <li>
                <a href="Configuration.html#method-i-to_prepare_blocks">to_prepare_blocks</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>W</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Configuration.html#method-i-watchable_dirs">watchable_dirs</a>,
              </li>
            
              
              <li>
                <a href="Configuration.html#method-i-watchable_files">watchable_files</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    


    


    <!-- Methods -->
    
      <div class="sectiontitle">Class Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-c-new">
            
              <b>new</b>()
            
            <a href="Configuration.html#method-c-new" name="method-c-new" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L6" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-new_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 6</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>
  <span class="ruby-identifier">@@options</span> <span class="ruby-operator">||=</span> {}
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                  
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-after_initialize">
            
              <b>after_initialize</b>(&amp;block)
            
            <a href="Configuration.html#method-i-after_initialize" name="method-i-after_initialize" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Last configurable block to run. Called after frameworks initialize.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-after_initialize_source')" id="l_method-i-after_initialize_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L68" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-after_initialize_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 68</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_initialize</span>(&amp;<span class="ruby-identifier">block</span>)
  <span class="ruby-constant">ActiveSupport</span>.<span class="ruby-identifier">on_load</span>(<span class="ruby-value">:after_initialize</span>, <span class="ruby-keyword">yield</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, &amp;<span class="ruby-identifier">block</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-app_generators">
            
              <b>app_generators</b>()
            
            <a href="Configuration.html#method-i-app_generators" name="method-i-app_generators" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>This allows you to modify application’s generators from Railties.</p>

<p>Values set on <a
href="Configuration.html#method-i-app_generators">#app_generators</a> will
become defaults for application, unless application overwrites them.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-app_generators_source')" id="l_method-i-app_generators_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L45" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-app_generators_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 45</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">app_generators</span>
  <span class="ruby-identifier">@@app_generators</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Rails</span><span class="ruby-operator">::</span><span class="ruby-constant">Configuration</span><span class="ruby-operator">::</span><span class="ruby-constant">Generators</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-keyword">yield</span>(<span class="ruby-identifier">@@app_generators</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
  <span class="ruby-identifier">@@app_generators</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-app_middleware">
            
              <b>app_middleware</b>()
            
            <a href="Configuration.html#method-i-app_middleware" name="method-i-app_middleware" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>This allows you to modify the application’s middlewares from Engines.</p>

<p>All operations you run on the <a
href="Configuration.html#method-i-app_middleware">#app_middleware</a> will
be replayed on the application once it is defined and the
default_middlewares are created</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-app_middleware_source')" id="l_method-i-app_middleware_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L37" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-app_middleware_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 37</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">app_middleware</span>
  <span class="ruby-identifier">@@app_middleware</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Rails</span><span class="ruby-operator">::</span><span class="ruby-constant">Configuration</span><span class="ruby-operator">::</span><span class="ruby-constant">MiddlewareStackProxy</span>.<span class="ruby-identifier">new</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-before_configuration">
            
              <b>before_configuration</b>(&amp;block)
            
            <a href="Configuration.html#method-i-before_configuration" name="method-i-before_configuration" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>First configurable block to run. Called before any initializers are run.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-before_configuration_source')" id="l_method-i-before_configuration_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L52" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-before_configuration_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 52</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">before_configuration</span>(&amp;<span class="ruby-identifier">block</span>)
  <span class="ruby-constant">ActiveSupport</span>.<span class="ruby-identifier">on_load</span>(<span class="ruby-value">:before_configuration</span>, <span class="ruby-keyword">yield</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, &amp;<span class="ruby-identifier">block</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-before_eager_load">
            
              <b>before_eager_load</b>(&amp;block)
            
            <a href="Configuration.html#method-i-before_eager_load" name="method-i-before_eager_load" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Third configurable block to run. Does not run if
<code>config.cache_classes</code> set to false.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-before_eager_load_source')" id="l_method-i-before_eager_load_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L58" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-before_eager_load_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 58</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">before_eager_load</span>(&amp;<span class="ruby-identifier">block</span>)
  <span class="ruby-constant">ActiveSupport</span>.<span class="ruby-identifier">on_load</span>(<span class="ruby-value">:before_eager_load</span>, <span class="ruby-keyword">yield</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, &amp;<span class="ruby-identifier">block</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-before_initialize">
            
              <b>before_initialize</b>(&amp;block)
            
            <a href="Configuration.html#method-i-before_initialize" name="method-i-before_initialize" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Second configurable block to run. Called before frameworks initialize.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-before_initialize_source')" id="l_method-i-before_initialize_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L63" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-before_initialize_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 63</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">before_initialize</span>(&amp;<span class="ruby-identifier">block</span>)
  <span class="ruby-constant">ActiveSupport</span>.<span class="ruby-identifier">on_load</span>(<span class="ruby-value">:before_initialize</span>, <span class="ruby-keyword">yield</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, &amp;<span class="ruby-identifier">block</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-eager_load_namespaces">
            
              <b>eager_load_namespaces</b>()
            
            <a href="Configuration.html#method-i-eager_load_namespaces" name="method-i-eager_load_namespaces" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>All namespaces that are eager loaded</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-eager_load_namespaces_source')" id="l_method-i-eager_load_namespaces_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L16" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-eager_load_namespaces_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 16</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">eager_load_namespaces</span>
  <span class="ruby-identifier">@@eager_load_namespaces</span> <span class="ruby-operator">||=</span> []
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-respond_to-3F">
            
              <b>respond_to?</b>(name)
            
            <a href="Configuration.html#method-i-respond_to-3F" name="method-i-respond_to-3F" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-respond_to-3F_source')" id="l_method-i-respond_to-3F_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L83" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-respond_to-3F_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 83</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">respond_to?</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-keyword">super</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">@@options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_sym</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-to_prepare">
            
              <b>to_prepare</b>(&amp;blk)
            
            <a href="Configuration.html#method-i-to_prepare" name="method-i-to_prepare" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Defines generic callbacks to run before <a
href="Configuration.html#method-i-after_initialize">after_initialize</a>.
Useful for <a href="../Railtie.html">Rails::Railtie</a> subclasses.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-to_prepare_source')" id="l_method-i-to_prepare_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L79" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-to_prepare_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 79</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_prepare</span>(&amp;<span class="ruby-identifier">blk</span>)
  <span class="ruby-identifier">to_prepare_blocks</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">blk</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">blk</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-to_prepare_blocks">
            
              <b>to_prepare_blocks</b>()
            
            <a href="Configuration.html#method-i-to_prepare_blocks" name="method-i-to_prepare_blocks" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p><a href="../../Array.html">Array</a> of callbacks defined by <a
href="Configuration.html#method-i-to_prepare">to_prepare</a>.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-to_prepare_blocks_source')" id="l_method-i-to_prepare_blocks_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L73" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-to_prepare_blocks_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 73</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_prepare_blocks</span>
  <span class="ruby-identifier">@@to_prepare_blocks</span> <span class="ruby-operator">||=</span> []
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-watchable_dirs">
            
              <b>watchable_dirs</b>()
            
            <a href="Configuration.html#method-i-watchable_dirs" name="method-i-watchable_dirs" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Add directories that should be watched for change. The key of the hashes
should be directories and the values should be an array of extensions to
match in each directory.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-watchable_dirs_source')" id="l_method-i-watchable_dirs_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L28" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-watchable_dirs_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 28</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">watchable_dirs</span>
  <span class="ruby-identifier">@@watchable_dirs</span> <span class="ruby-operator">||=</span> {}
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-watchable_files">
            
              <b>watchable_files</b>()
            
            <a href="Configuration.html#method-i-watchable_files" name="method-i-watchable_files" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Add files that should be watched for change.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-watchable_files_source')" id="l_method-i-watchable_files_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3/railties/lib/rails/railtie/configuration.rb#L21" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-watchable_files_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/railtie/configuration.rb, line 21</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">watchable_files</span>
  <span class="ruby-identifier">@@watchable_files</span> <span class="ruby-operator">||=</span> []
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                    </div>

    </div>
  </body>
</html>    